import {RequestParam,HttpRequest} from '@/utils/http'

/**
 * 系统通知服务
 */
export const NotifyService = {
	// 通知列表
	listNotify: function() {
		const request = new RequestParam();
		request.url = "/api/notify/list.do";
		return HttpRequest(request);
	},
	// 通知详情
	detailNotify: function(notifyId){
		const request = new RequestParam();
		request.url = "/api/notify/detail.do";
		request.param={notifyId:notifyId}
		return HttpRequest(request);
	}
}

/**
 * 产品评论服务
 */
export const CommentService={
	listComment:function(productId){
		const request = new RequestParam();
		request.url = "/api/product/comment/list.do";
		request.param={productId:productId}
		return HttpRequest(request);
	},
	addComment:function(data){
		const request = new RequestParam();
		request.url = "/api/product/comment/add.do";
		request.method="POST";
		request.param=data;
		return HttpRequest(request);
	}
}